﻿/**
 *
 * @file FITKAbaqusHDF5AdaptorAbaWire.h
 * @brief 读写HDF5文件的AbaWire类
 * @author fulipeng (fulipengqd@yeah.net)
 * @date 2024-07-01
 *
 */
#ifndef  _FITKABAQUSHDF5ADAPTORABAWIRE_H__
#define  _FITKABAQUSHDF5ADAPTORABAWIRE_H__

#include "FITKAbaqusIOHDF5API.h"
#include "FITKAbaqusHDF5AbstractAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"
#include "FITK_Interface/FITKInterfaceIOHDF5/FITKInterfaceHDF5AdaptorAssElement.h"

 //前置声明
ForwardDeclarNS(Interface, FITKAbaWire)

namespace IO
{
    /**
     * @brief HDF5 AbaWire 线 读写适配器
     * @author fulipeng (fulipengqd@yeah.net)
     * @date 2024-07-01
     */
    class FITKABAQUSIOHDF5API FITKAbaqusHDF5AdaptorAbaWire : public FITKInterfaceHDF5AdaptorAssemblyElementLine
    {
    public:
        explicit FITKAbaqusHDF5AdaptorAbaWire() = default;
        virtual ~FITKAbaqusHDF5AdaptorAbaWire() = default;

        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        QString getAdaptorClass() override;

        /**
         * @brief 适配器读取
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool adaptW() override;

        /**
         * @brief 读取线
         * @param wire 线
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool readAbaWire(Interface::FITKAbaWire* wire, H5::Group & h5Group);

        /**
         * @brief 写出线
         * @param wire 线
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool writeAbaWire(Interface::FITKAbaWire* wire, H5::Group & h5Group);

    };

    Register2FITKIOAdaptorFactory(HDF5, Interface::FITKAbaWire, FITKAbaqusHDF5AdaptorAbaWire)

}

#endif
